<template>   
<table class="table" border="1">
    <tr>
        <td>用户名：</td>
        <td>
            <input type="text" name="name" placeholder="请输入用户名" v-model="name"/>
        </td>
    </tr>
    <tr>
        <td>用户密码：</td>
        <td>
            <input type="password" name="pwd" placeholder="请输入用户密码" v-model="pwd"/>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="button" value="登录" @click="login()"/>
        </td>
    </tr>
</table>

</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter();
const name = ref('');
const pwd = ref('');
const login = () => {
    router.push({
        path:"/showLogin",
        params:{
            name:name.value,
            pwd:pwd.value}
    });
}


</script>